<?php require("../common/pdata_mysql.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>批文管理</title>
<style type="text/css">
.list {
	width: 100%;
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	font-size: 11px;
}
</style>
<link href="/css/allstyle.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="header"><?php include("../common/header.php") ?></div>
<div id="wrap">
<?php 
	$sql = "select * from postdoc order by pdid";
	$conn = mysql_pconnect($hostname_pdata,$username_pdata,$password_pdata);
	mysql_select_db("pdata");
	$rs = mysql_query($sql,$conn) or die(mysql_error());

	echo "<p>已收录文件 ".mysql_num_rows($rs)." 个</p>";

?>
<table border="1" class="list">
	<tr>
    	<th width="35">代码</th>
        <th width="180">发文文号</th>
        <th>发文名称</th>
        <th width="140px">发文单位</th>
        <th width="55px">编辑</th>
     </tr>
     
  <?php 
	while($row = mysql_fetch_array($rs))
	{
		echo "<tr>";
		echo "<td>".$row['PDid']."</td>";
		echo "<td>".$row['TitlePre']."[".$row['TitleYear']."]".$row['TitleArray']."号"."</td>";
		echo "<td>".$row['PDName']."</td>";
		echo "<td>".$row['RedTitle']."</td>";
		echo "<td>"."<a target='_new' href='post_edit.php?modi=修改&pdid=".$row['PDid']."'>编辑</a>|<a target='_new' href='post_del.php?pdid=".$row['PDid']."'>删除</a>"."</td>";
		echo "</tr>";
	}
	mysql_close($conn);

?>
</table>
</div>
<div id="footer"><?php include("../common/footer.php") ?></div>
</body>
</html>